echo -e "[archlinuxcn]\nServer = https://mirrors.bfsu.edu.cn/archlinuxcn/\$arch" |sudo tee -a /etc/pacman.conf
sudo pacman -Syyu
sudo pacman-key --lsign-key "farseerfc@archlinux.org"
sudo pacman -S archlinuxcn-keyring --noconfirm
sudo pacman -S yay zsh --noconfirm
#yay -S fcitx5 fcitx5-configtool fcitx5-qt fcitx5-gtk fcitx5-sogou fcitx5-input-support  motrix thunderbird thunderbird-i18n-zh-cn vlc  spotify visual-studio-code-bin linuxqq telegram-desktop simplenote-electron-bin netease-cloud-music-gtk4 obsidian obs-studio wps-office-cn wps-office-mui-zh-cn wemeet-bin go python-pip openjdk17-src
yay -S fcitx5 fcitx5-configtool fcitx5-qt fcitx5-gtk fcitx5-chinese-addons fcitx5-pinyin-sougou fcitx5-pinyin-zhwiki fcitx5-pinyin-moegirl fcitx5-input-support thunderbird thunderbird-i18n-zh-cn vlc zvbi spotify visual-studio-code-bin linuxqq telegram-desktop simplenote-electron-bin netease-cloud-music-gtk4 obsidian obs-studio wps-office-cn wps-office-mui-zh-cn wemeet-bwrap go python-pip openjdk17-src --noconfirm
#yay -S electron22-bin motrix --noconfirm

#yay -S ssfconv
#wget http:sogou-theme
#mkdir -p ~/.local/share/fcitx5/themes
#ssfconv  -t fcitx5 theme.ssf themename

echo -e "can you use google?\n1.yes  2.no"
read google
if [ $google -eq 1 ];then
yay -S firefox firefox-i18n-zh-cn google-chrome microsoft-edge-stable-bin --noconfirm
else
yay -S firefox firefox-i18n-zh-cn firefox-adblock-plus firefox-ublock-origin  microsoft-edge-stable-bin chromium chromium-extension-ublock-origin --noconfirm
fi



echo "something may retry when useful"

yay -S ttf-wps-fonts  kodi kodi-addon-pvr-iptvsimple yesplaymusic --noconfirm

echo "more ttf at ttf-ms-win11-auto-zh_cn ttf-ms-win10-auto....(yay -Ss ttf-ms)"

echo -e "export GTK_IM_MODULE=fcitx\nexport QT_IM_MODULE=fcitx\nexport XMODIFIERS=\"@im=fcitx\"" > ~/.xprofile
sudo sed -i 's/Exec=\/opt\/Simplenote\/simplenote %U/Exec=\/opt\/Simplenote\/simplenote --no-sandbox %U/g' /usr/share/applications/simplenote.desktop

sudo sed -i '/\[multilib\]/{s/#//;n;s/#//}' /etc/pacman.conf
yay -Syyu
#yay -S com.qq.weixin.spark
yay -S wechat-universal-bwrap --noconfirm


sh -c "$(curl -fsSL https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"

echo "everthing ok?"
echo "more settings goto https://zhuanlan.zhihu.com/p/461393131"
echo "vaapi to ~/.config/chrome-flags.conf  ~/.config/chromium-flags.conf  ~/.config/microsoft-edge-stable-flags.conf for hardware accelaration"
echo "cp /usr/share/applications/xxxxx.desktop  .local/share/applications/ ;and change Exec=env WECHAT_IME_WORKAROUND=fcitx for wechat fcitx input;env QT_IM_MODULE=fcitx for wps component fcitx input"
echo "nano [Settings] gtk-im-module=fcitx >> ~/.config/gtk-3.0/settings.ini for xwayland chromium browser"
read $ok

